package cn.alex.sso.project.mapper;

import cn.alex.sso.project.entity.SysRole;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @author Alex
 * @description 针对表【sys_role(角色表)】的数据库操作Mapper
 * @createDate 2024-09-24 17:05:38
 * @Entity cn.alex.sso.project.entity.SysRole
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    default LambdaQueryWrapper<SysRole> getQueryWrapper(SysRole entity) {
        return new LambdaQueryWrapper<SysRole>()
                .like(StrUtil.isNotBlank(entity.getName()), SysRole::getName, entity.getName());
    }
}




